package com.waikuai.shop.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import java.time.LocalDate;

/**
 * 个人信息更新DTO
 * @author waikuai
 */
@Data
public class UpdateProfileDTO {
    
    /**
     * 手机号
     */
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
    
    /**
     * 邮箱
     */
    @Email(message = "邮箱格式不正确")
    private String email;
    
    /**
     * 生日
     */
    private LocalDate birthday;
    
    /**
     * 头像URL
     */
    private String avatar;
}